#ifndef DBQUERIESTHREAD_H
#define DBQUERIESTHREAD_H

#include <QObject>
#include "cnsMacroGlobal.h"
#include <QThread>
#include "cnsComponent.h"
#include "dbquerybasethread.h"

class DbQueriesThread : public DbQueryBaseThread {
    Q_OBJECT
public:
    Q_INVOKABLE DbQueriesThread();
    virtual ~DbQueriesThread() override;
};

CNS_COM_DECL_METATYPE(DbQueriesThread)

class SysDbQueriesThread : public QObject
{
    Q_OBJECT
public:
    Q_INVOKABLE SysDbQueriesThread();

    Q_INVOKABLE void f_initDbQueriesThread(CnsComponentPtr com, QVariantHash& props, QScopedPointer<QThread>& thread);

public slots:
    void stop(CnsComponentPtr com);
    bool query_b(CnsComponentPtr com, QString &dbID, QVariantHash &props);
};

Q_DECLARE_METATYPE(SysDbQueriesThread*)

#endif  // DBQUERIESTHREAD_H
